<template>
  <el-row class="account">
    <el-row>
      <el-form :model="accountForm" class="conditionForm">
        <el-row type="flex" align="middle" justify="space-between" class="condition">
          <el-col :span="6" class="button-col-lf">
            <el-button type="primary" @click="exportItems" icon="el-icon-download" size="medium"
              class="queryButton">选择导出</el-button>
          </el-col>
          <el-col :span="18" style="display: flex;justify-content: flex-end;">
            <el-form-item label="账号:" style="display: flex;">
              <el-input v-model="accountForm.account" placeholder="账号" clearable size="medium" class="inputNormal" />
              <el-button type="primary" @click="onSubmit" icon="el-icon-search" size="medium">查询</el-button>
            </el-form-item>

          </el-col>
        </el-row>
      </el-form>
    </el-row>
    <el-row>
      <el-table :data="dataList" border @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55">
        </el-table-column>
        <el-table-column prop="transactionProcessTime" label="事务处理时间" width="120">
          <template v-slot="scope">
            <span>{{ timeFormat(scope.row.transactionProcessTime, 'y2s') }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="account" label="账户" width="200" />
        <el-table-column prop="totalPrice" label="事务处理值" width="200" />
        <el-table-column prop="materialCode" label="物料编码" width="200" />
        <el-table-column prop="transactionType" label="事务处理类型" />

      </el-table>
    </el-row>
    <el-row style="margin-top: 10px;">
      <el-pagination :total="pageInfo.total" background layout="total, sizes, prev, pager, next"
        :page-size="pageInfo.pageSize" :current-page="pageInfo.pageIndex" :page-sizes="[1, 10, 20, 30, 40]"
        @size-change="pageSizeChange" @current-change="selectData" style="float: right;"></el-pagination>
    </el-row>
  </el-row>
</template>

<script setup lang="ts">
import { timeFormat } from "@/utils/time"
import { Ref, ref } from "vue";

const accountForm = ref({
  account: '1111'
})
const dataList: Ref<Array<any>> = ref([])
const handleSelectionChange = () => {

}
const exportItems = () => {

}
const onSubmit = () => {

}
const pageInfo = ref({
  total: 0,
  pageSize: 10,
  pageIndex: 1
})
const pageSizeChange = () => {

}
const selectData = () => {

}
</script>

<style lang="scss" scoped>
// .account {}
</style>